﻿using System;
using Gp.Scripts.Core;

namespace Gp.Scripts.Core {
    public class AttackContext {
        public AttackContext(BaseUnit target) {
            Target = target;
        }


        public AttackContext(BaseUnit target, ModifierValue damageBonus) {
            PreProcess = e => e.BonusDamage(damageBonus);
            Target = target;
        }

        public AttackContext(BaseUnit target, Action<AttackActionRequest> preProcess){
            PreProcess = preProcess;
            Target = target;
        }

        // public AttachCell TargetCell { get; }
        public readonly BaseUnit Target;
        public bool CallReaction = true;
        public bool UseAccelerate = true;
        public Action<AttackActionRequest> PreProcess;
    }
}